-- GENERATED SPELL FOR [Cho'war the Pillager] --


function spell0_18423(pUnit, Event) --@Battle Shout,Self--
pUnit:FullCastSpellOnTarget(31403,pUnit)
pUnit:RegisterEvent('Sorts_18423', 581, 1)
end

function spell1_18423(pUnit, Event) --@Charge,n/a--
pUnit:FullCastSpellOnTarget(32323,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18423', 2268, 1)
end

function spell2_18423(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(15708,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18423', 5286, 1)
end

function spell3_18423(pUnit, Event) --@Sundering Cleave,n/a--
pUnit:FullCastSpellOnTarget(17963,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18423', 30258, 1)
end

function Sorts_18423(pUnit, Event)
local choix_sorts_18423 = math.random(0, 3)
if choix_sorts_18423 == 0 then
pUnit:RegisterEvent('spell0_18423', 1, 1)
end
if choix_sorts_18423 == 1 then
pUnit:RegisterEvent('spell1_18423', 1, 1)
end
if choix_sorts_18423 == 2 then
pUnit:RegisterEvent('spell2_18423', 1, 1)
end
if choix_sorts_18423 == 3 then
pUnit:RegisterEvent('spell3_18423', 1, 1)
end
end

function mob18423_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18423', math.random(1500, 3000), 1)
end

function mob18423_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18423_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18423_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18423, 1, 'mob18423_Action')
RegisterUnitEvent(18423, 2, 'mob18423_Leave')
RegisterUnitEvent(18423, 3, 'mob18423_Kill')
RegisterUnitEvent(18423, 4, 'mob18423_Die')
